DimenFill

class DimenFill(val initialBaseDp: Float, val sortedCustomEntries: List<CustomDpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)

EN A class that allows defining custom dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).

The value is resolved using a Context and uses the base value or a custom value, applying dynamic scaling at the end.

PT Classe que permite a definição de dimensões customizadas baseadas em qualificadores de tela (UiModeType, Largura, Altura, Smallest Width).

Constructors

Link copied to clipboard
private constructor(initialBaseDp: Float, sortedCustomEntries: List<CustomDpEntry> = emptyList(), ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null)
constructor(initialBaseDp: Float)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val initialBaseDp: Float
Link copied to clipboard

Functions

Link copied to clipboard

EN Allow applying aspect ratio based constraint scaling. PT Permite aplicar o escalonamento restrito baseado na proporção da tela (aspect ratio).

Link copied to clipboard
fun flhdp(context: Context): Float
Link copied to clipboard
fun flhdpBase(context: Context): Float
Link copied to clipboard
fun flsdp(context: Context): Float
Link copied to clipboard
fun flsdpBase(context: Context): Float

EN Get the resolved value in DP (as Float).

Link copied to clipboard

EN Resolves flsdp, flhdp, and flwdp in one pass (single UiModeType.fromConfiguration and config read). PT Resolve flsdp, flhdp e flwdp numa só passagem.

Link copied to clipboard
fun flwdp(context: Context): Float
Link copied to clipboard
fun flwdpBase(context: Context): Float
Link copied to clipboard

EN Allow ignoring the constraint scaling based on multi-window resizing properties. PT Permite ignorar o escalonamento restrito baseado nas propriedades de redimensionamento de multi-janelas.

Link copied to clipboard
fun px(context: Context, qualifier: DpQualifier): Float

EN Resolves the final value in pixels (Float).

Link copied to clipboard
Link copied to clipboard
private fun resolveDp(context: Context, qualifier: DpQualifier): Float
Link copied to clipboard
private fun resolveDpInternal(context: Context, qualifier: DpQualifier, configuration: Configuration, currentUiModeType: UiModeType): Float
Link copied to clipboard
fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: Float, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: Number, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(type: UiModeType, customValue: Float, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(type: UiModeType, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(type: DpQualifier, value: Int, customValue: Float, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(type: DpQualifier, value: Int, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, orientation: Orientation? = Orientation.DEFAULT, customValue: Float, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill